#ifndef WINDOWCONTROLLER_H
#define WINDOWCONTROLLER_H

#include <QObject>
#include <QQuickWindow>

class WindowController : public QObject {
    Q_OBJECT

public:
    WindowController(QQuickWindow *window) : window(window) {}

    Q_INVOKABLE void minimizeWindow() {
        if (window) {
            window->showMinimized();
        }
    }

    Q_INVOKABLE void maximizeWindow() {
        if (window) {
            window->showMaximized();
        }
    }

    Q_INVOKABLE void restoreWindow() {
        if (window) {
            window->showNormal();
        }
    }

private:
    QQuickWindow *window;
};

#endif // WINDOWCONTROLLER_H
